<template>
  <div class="main">
    <div class="mine">
      <!-- 头像 用户名 -->
      <div class="information">
        <div class="photo">
          <img :src="mine?.url" alt="" />
        </div>
        <div class="content">
          <div class="name">{{ mine?.name }}</div>
          <div class="num">账号：{{ mine?.num }}</div>
        </div>
      </div>
      <!-- 个性签名 -->
      <div class="introduce">{{ mine?.brief }}</div>
      <!-- 其他 -->
      <div class="orther">
        <div class="follow"><span>2</span><span>关注</span></div>
        <div class="fans"><span>2</span><span>粉丝</span></div>
        <div class="fabulous"><span>0</span><span>获赞</span></div>
        <router-link to="/setUp">
          <div class="edit">编辑资料</div>
        </router-link>
      </div>
    </div>
    <div class="record">
      <div class="recordList">
        <router-link to="/home/mine/note" active-class="active">
          笔记
        </router-link>
        <router-link to="/home/mine/collection" active-class="active">
          收藏
        </router-link>
        <router-link to="/home/mine/fabulous" active-class="active">
          赞过
        </router-link>
      </div>
      <div class="recordContent">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>
<script>
import { mapState } from "vuex";
export default {
  computed: {
    ...mapState(["mine"]),
    ...mapState(['token'])
  },
};
</script>
<style scoped lang="scss">
.main {
  padding-top: 60px;
  padding-bottom: 60px;
  .mine {
    width: 100%;
    padding: 10px 10px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: linear-gradient(#293d56, #4e5452);
    color: #fff;
    .information {
      width: 100%;
      height: 100px;
      display: flex;
      .photo {
        height: 100px;
        width: 100px;
        img {
          height: 100px;
          width: 100px;
          border-radius: 50%;
        }
      }
      .content {
        flex: 1;
        padding: 0 20px;
        display: flex;
        flex-direction: column;
        > div {
          width: 100%;
          height: 50px;
          line-height: 50px;
        }
        .name {
          font-size: 20px;
          font-weight: 600;
        }
        .num {
          font-size: 16px;
          color: #ccc;
        }
      }
    }
    .introduce {
      width: 100%;
      height: 50px;
      font-size: 16px;
      margin: 10px 0;
      padding: 0 10px;
      box-sizing: border-box;
      line-height: 25px;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      color: rgb(212, 212, 212);
      font-size: 14px;
    }
    .orther {
      width: 100%;
      height: 50px;
      display: flex;
      > div {
        font-size: 16px;
      }
      .follow {
        flex-basis: 20%;
        display: flex;
        flex-direction: column;
        text-align: center;
      }
      .fans {
        flex-basis: 20%;
        display: flex;
        flex-direction: column;
        text-align: center;
      }
      .fabulous {
        flex-basis: 20%;
        display: flex;
        flex-direction: column;
        text-align: center;
      }
      a {
        color: #fff;
        font-size: 16px;
        flex-basis: 100px;
        margin-top: 10px;
        margin-left: 30px;
        .edit {
          height: 30px;
          text-align: center;
          line-height: 30px;
          border: 1px solid #fff;
          border-radius: 20px;
        }
      }
    }
  }
  .record {
    width: 100%;
    min-height: 450px;
    background: #fafafa;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin-top: -15px;
    .recordList {
      border-top-left-radius: 20px;
      border-top-right-radius: 20px;
      width: 240px;
      margin: 0 auto;
      height: 50px;
      background: #fff;
      display: flex;
      justify-content: space-between;
      a {
        font-size: 18px;
        color: #ccc;
        width: 80px;
        text-align: center;
        line-height: 50px;
      }
      .active {
        font-weight: 600;
        color: #000;
        border-bottom: #fb73a7 2px solid;
      }
    }
  }
}
</style>